#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2021/12/14 12:48 
# @Author : cc
# @File : testpy.py

import unittest,threading,time
from HTMLTestRunner_PY3 import HTMLTestRunner

def test_task(name):
    print(f"{threading.current_thread().name}:",name)
    time.sleep(0.1)

class TestTask(unittest.TestCase):
    def test01(self):
        test_task(1)
    def test02(self):
        test_task(2)
    def test03(self):
        test_task(3)
    def test04(self):
        test_task(4)
    def test05(self):
        test_task(5)
    def test06(self):
        test_task(6)
    def test07(self):
        test_task(7)
    def test08(self):
        test_task(8)
    def test09(self):
        test_task(9)
    def test10(self):
        test_task(10)

# if __name__ == '__main__':
#     # unittest.main()
#     t1 =unittest.TestLoader()
#     suite =t1.discover("./","testpy.py")
#     with open(file="./test_result.html", mode='wb') as f:
#         runner = HTMLTestRunner(f,verbosity=2,title="测试报告")
#         runner.run(suite)